<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = [1, 2, 3, 4, 5, 9];
        console.log(arr[0]);
        // console.log(arr.charAt(0));charAt()跟charCodeAt()查找元素都是字符串独有的，但是 变量[下标] 是通用的
        var str = '1oot';
        console.log(str[0]);
        console.log(str.charAt(0));
        console.log(str.charCodeAt(0));
    </script>
</head>

<body>

</body>

</html>